﻿using System;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations.Schema;
using YiSha.Util;

namespace YiSha.Entity.QixingManage
{
    /// <summary>
    /// 创 建：admin
    /// 日 期：2023-03-19 19:47
    /// 描 述：订单管理实体类
    /// </summary>
    [Table("order_master")]
    public class OrderMasterEntity : BaseEntity
    {
        /// <summary>
        /// 订单编号 yyyymmddnnnnnnnn
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(StringJsonConverter))]
        public long? order_sn { get; set; }
        /// <summary>
        /// 下单人ID
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(StringJsonConverter))]
        public long? customer_id { get; set; }
        /// <summary>
        /// 收货人姓名
        /// </summary>
        /// <returns></returns>
        public string shipping_user { get; set; }

        /// <summary>
        /// 收货人电话
        /// </summary>
        public string ship_mobile { get; set; }
        /// <summary>
        /// 省
        /// </summary>
        /// <returns></returns>
        public string province { get; set; }
        /// <summary>
        /// 市
        /// </summary>
        /// <returns></returns>
        public string city { get; set; }
        /// <summary>
        /// 区
        /// </summary>
        /// <returns></returns>
        public string district { get; set; }
        /// <summary>
        /// 地址
        /// </summary>
        /// <returns></returns>
        public string address { get; set; }
        /// <summary>
        /// 支付方式：1现金，2余额，3网银，4支付宝，5微信
        /// </summary>
        /// <returns></returns>
        public int? payment_method { get; set; }
        /// <summary>
        /// 订单金额
        /// </summary>
        /// <returns></returns>
        public float? order_money { get; set; }
        /// <summary>
        /// 支付金额
        /// </summary>
        /// <returns></returns>
        public float? payment_money { get; set; }
        /// <summary>
        /// 下单时间
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? create_time { get; set; }
        /// <summary>
        /// 发货时间
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? shipping_time { get; set; }
        /// <summary>
        /// 支付时间
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? pay_time { get; set; }
        /// <summary>
        /// 收货时间
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? receive_time { get; set; }
        /// <summary>
        /// 订单状态：0->待付款；1->待发货；2->已发货；3->已完成；4->已关闭；5->无效订单
        /// </summary>
        /// <returns></returns>
        public byte? order_status { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? modified_time { get; set; }
        /// <summary>
        /// 订单来源：0->小程序
        /// </summary>
        /// <returns></returns>
        public int? source_type { get; set; }
        /// <summary>
        /// 租车地点
        /// </summary>
        /// <returns></returns>
        public string car_rental_addr { get; set; }
        /// <summary>
        /// 还车地点
        /// </summary>
        /// <returns></returns>
        public string car_return_addr { get; set; }
        /// <summary>
        /// 订单类型1租车；2购买新车；3购买二手车
        /// </summary>
        /// <returns></returns>
        public int? order_type { get; set; }
        /// <summary>
        /// 支付订单号
        /// </summary>
        /// <returns></returns>
        public string ordernumber { get; set; }
        /// <summary>
        /// 购买数量
        /// </summary>
        /// <returns></returns>
        public int? product_cnt { get; set; }
        /// <summary>
        /// 超时时间
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? overtime { get; set; }

        /// <summary>
        /// 商品单价
        /// </summary>
        public double? goods_price { get; set; }

        [JsonConverter(typeof(StringJsonConverter))]
        public long? tenant_id { get; set; }

        /// <summary>
        /// 配置方式
        /// </summary>
        public string delivery_company { get; set; }

        /// <summary>
        /// 物流单号
        /// </summary>
        public string delivery_sn { get; set; }

        /// <summary>
        /// 确认收货状态
        /// </summary>
        public int? confirm_status { get; set; }
    }
}
